package roleservicelogic

import (
	"context"
	"smile-sunshine-micorservice/rpc/User/db/crud"

	"smile-sunshine-micorservice/rpc/User/internal/svc"
	"smile-sunshine-micorservice/rpc/User/pb/zipTako.com/SmileSunshine/user"

	"github.com/zeromicro/go-zero/core/logx"
)

type GetUserRolesLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
	UserRolesModel crud.UserRolesModel
	RolesModel     crud.RolesModel
}

func NewGetUserRolesLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetUserRolesLogic {
	return &GetUserRolesLogic{
		ctx:            ctx,
		svcCtx:         svcCtx,
		Logger:         logx.WithContext(ctx),
		UserRolesModel: crud.NewUserRolesModel(svcCtx.SqlConn, svcCtx.CacheConf),
		RolesModel:     crud.NewRolesModel(svcCtx.SqlConn, svcCtx.CacheConf),
	}
}

func (l *GetUserRolesLogic) GetUserRoles(in *user.GetUserRolesRequest) (*user.GetUserRolesResponse, error) {
	// todo: add your logic here and delete this line

	return &user.GetUserRolesResponse{}, nil
}
